import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-bind',
  templateUrl: './bind.component.html',
  styleUrls: ['./bind.component.css']
})
export class BindComponent implements OnInit {

  imgUrl: string = "http://placehold.it/400x320";
  greeting:string ="A value";
  isBig:boolean = true;
  name:string = "name"
  divClass:any = {    //也可以把这个对象直接写到模板里面
    a:false,
    b:true,
    c:false
  };

  divStyle:any ={
    color:"red",
    fontSize:"20px"
  }

  isDev:boolean = true;

  myBirthday:Date = new Date();

  pi:number = 3.1415926;
  size:number = 7;
  constructor() { }

  ngOnInit() {
  }

  doOnInput(event: any) {
    console.log(event.target.value);
    console.log(event.target.getAttribute("value"));
  }

}
